<template>
	<view class="search-box" :style="{'background-color':bgcolor}" @click="searchBoxHandler">
		<view class="search-area" :style="{'border-radius':radius + 'px'}">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>
<script>
	export default {
		name:"goods-search",
		props:{
			bgcolor:{
				type:String,
				default:'#c00000'
			},
			radius:{
				type:Number,
				default:18 //px
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			searchBoxHandler(){
				this.$emit('searchClick')
			}
		}
	}
</script>

<style lang="scss">
.search-box{
	display: flex;
	align-items: center;
	height: 50px;
	padding: 0 10px;
	//background-color: #c00000;
	.search-area{
		width: 100%;
		height: 36px;
		//border-radius: 18px;
		background-color: #ffffff;
		line-height: 36px;
		text-align: center;
	}
	.placeholder{
		font-size: 14px;
		margin-left: 5px;
	}
}
</style>